<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:t="http://myfaces.apache.org/tomahawk"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:s="http://myfaces.apache.org/sandbox"
                xmlns:jwork="http://irian.at/jsfatwork"
        >
    <ui:define name="content">
        <h:form id="cform">
            <h3>Task Step 3</h3>
                <h:panelGrid columns="3">
                    <h:outputLabel for="resource" value="resource" />
                    <h:selectManyListbox id="resource" value="#{taskBean.entity.resources}" converter="#{taskBean.resourceConverter}">
                        <t:selectItems var="resource" itemLabel="#{resource.name}" itemValue="#{resource}" value="#{humanResourceBean.readAllEntities}" />
                    </h:selectManyListbox>
                    <h:message for="resource" styleClass="warning" />

                    <h:panelGroup />
                    <h:panelGroup>
                        <div class="buttons">
                            <h:commandLink id="save" action="/tasks.xhtml" styleClass="positive" actionListener="#{taskBean.save}" >
                                <img src="images/tick.png" alt=""/>
                                Save
                            </h:commandLink >
                        </div>
                        <div class="buttons">
                            <h:commandLink id="cancel" styleClass="negative" action="#{taskBean.cancelBackToTasks}" immediate="true" >
                                <img src="images/tick.png" alt=""/>
                                Cancel
                            </h:commandLink >
                        </div>
                    </h:panelGroup>
                    <h:panelGroup />
              </h:panelGrid>
        </h:form>
    </ui:define>
</ui:composition>
